package com.forumdemo.forum.dao;

import com.forumdemo.forum.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int insert(User row);

    int insertSelective(User row);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User row);

    int updateByPrimaryKey(User row);

    // @Param 中的username 是 sql 传入的参数名，后面的是 java 代码中的变量名
    User selectByUserName(@Param("username") String username);
}